package com.xique.api.api;

import com.xique.api.api.factory.RemoteAccessTokenFallbackFactory;
import com.xique.api.api.model.LoginApiThirdToken;
import com.xique.common.core.constant.ServiceNameConstants;
import com.xique.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author shd
 * @create 2022/2/23 20:15
 */
@FeignClient(contextId = "RemoteAccessTokenService", value = ServiceNameConstants.API_BIZ_SERVICE, fallbackFactory = RemoteAccessTokenFallbackFactory.class)
public interface RemoteAccessTokenService {

    /**
     * 获取accessToken
     *
     * @param appId     /
     * @param appSecret /
     * @return com.xique.common.core.domain.R<?>
     * @author shd
     * @date 2022/2/23 20:09
     */
    @GetMapping(value = "accessToken/getThirdAccount")
    R<LoginApiThirdToken> getThirdAccount(@RequestParam("appId") String appId, @RequestParam("appSecret") String appSecret);

}
